﻿angular.module('resources.contactHistoryProxy', []);
angular.module('resources.contactHistoryProxy').factory('contactHistoryProxy', ['rresource', function (rresource) {
    var factory = rresource('contactHistory');

    factory.contactHistoryPaging = function (index, itemCount, filter, successcb, failedcb) {

        var itemspage = (index - 1) * itemCount;
        var filterStr = "$top=" + itemCount + "&$skip=" + itemspage + filter + "&$count=true";
        return factory.odataQuery(filterStr, successcb, failedcb);

    };

    factory.contactHistoryPagingCount = function (filter, successcb, failedcb) {

        var filterStr = filter;
        return factory.odataQuery(filterStr, successcb, failedcb);
    };


    return factory;
} ]);
